package com.zenchn.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;

@ApiModel(value="地区天气对象",description="地区天气对象")
public class WeatherDTO implements Serializable {

    private static final long serialVersionUID = 736374929928878877L;

    @ApiModelProperty(value="主键 天气数据ID")
    private String weatherDataId;

    @ApiModelProperty(value="地区名称")
    private String areaName;

    @ApiModelProperty(value="墨迹区域ID")
    private Integer mojiCityId;

    @ApiModelProperty(value="地区编码(行政区域编码)")
    private String areaId;

    @ApiModelProperty(value="实际时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime realDate;

    @ApiModelProperty(value="温度")
    private Float temp;

    @ApiModelProperty(value="湿度")
    private Float humidity;

    @ApiModelProperty(value="天气信息")
    private String info;

    @ApiModelProperty(value="风向")
    private String windDir;

    @ApiModelProperty(value="风力")
    private String windLevel;

    @ApiModelProperty(value="图标编号")
    private Integer icon;


    @ApiModelProperty(value="时间戳")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime timestamp;

    public String getWeatherDataId() {
        return weatherDataId;
    }

    public void setWeatherDataId(String weatherDataId) {
        this.weatherDataId = weatherDataId == null ? null : weatherDataId.trim();
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName == null ? null : areaName.trim();
    }

    public Integer getMojiCityId() {
        return mojiCityId;
    }

    public void setMojiCityId(Integer mojiCityId) {
        this.mojiCityId = mojiCityId;
    }

    public String getAreaId() {
        return areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId == null ? null : areaId.trim();
    }

    public LocalDateTime getRealDate() {
        return realDate;
    }

    public void setRealDate(LocalDateTime realDate) {
        this.realDate = realDate;
    }

    public Float getTemp() {
        return temp;
    }

    public void setTemp(Float temp) {
        this.temp = temp;
    }

    public Float getHumidity() {
        return humidity;
    }

    public void setHumidity(Float humidity) {
        this.humidity = humidity;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info == null ? null : info.trim();
    }

    public String getWindDir() {
        return windDir;
    }

    public void setWindDir(String windDir) {
        this.windDir = windDir == null ? null : windDir.trim();
    }

    public String getWindLevel() {
        return windLevel;
    }

    public void setWindLevel(String windLevel) {
        this.windLevel = windLevel == null ? null : windLevel.trim();
    }

    public Integer getIcon() {
        return icon;
    }

    public void setIcon(Integer icon) {
        this.icon = icon;
    }

    public LocalDateTime getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(LocalDateTime timestamp) {
        this.timestamp = timestamp;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", weatherDataId=").append(weatherDataId);
        sb.append(", areaName=").append(areaName);
        sb.append(", mojiCityId=").append(mojiCityId);
        sb.append(", areaId=").append(areaId);
        sb.append(", realDate=").append(realDate);
        sb.append(", temp=").append(temp);
        sb.append(", humidity=").append(humidity);
        sb.append(", info=").append(info);
        sb.append(", windDir=").append(windDir);
        sb.append(", windLevel=").append(windLevel);
        sb.append(", icon=").append(icon);
        sb.append(", timestamp=").append(timestamp);
        sb.append("]");
        return sb.toString();
    }
}